//
//  UIWindow+NEDConsole.m
//  NEDBugConsole_Example
//
//  Created by 98du on 2021/12/14.
//  Copyright © 2021 林宁宁. All rights reserved.
//

#import "UIWindow+NEDConsole.h"
#import "NEDConsole.h"

@implementation UIWindow (NEDConsole)


- (void) motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{
    //检测到摇动开始
    if (motion == UIEventSubtypeMotionShake){
      // your code
    }
}

- (void) motionCancelled:(UIEventSubtype)motion withEvent:(UIEvent *)event{
    //摇动取消
}

- (void) motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event{
    //摇动结束
    if (event.subtype == UIEventSubtypeMotionShake){
        // your code
        [NEDConsole enableDebugMode];
    }
}

- (BOOL)canBecomeFirstResponder {
    return YES;
}


@end
